Chapter 9: Sensing Viewer Actions
Table Of Contents
Chapter 9: Sensing Viewer Actions
Understanding How Viewer Actions Are Sensed
The TouchSensor Node Syntax
The PlaneSensor Node Syntax
The SphereSensor Node Syntax
The CylinderSensor Node Syntax
Experimenting with Sensors
Triggering Animation with Cursor Proximity
Figure 9.1
A cube that spins when the viewer's cursor moves over it.
Triggering Animation with Touch
Figure 9.2
A cube that spins when the viewer touches it.
Translating Shapes on a Plane
Figure 9.3
A cube that translates in the XY plane when the viewer drags it.
Figure 9.4
A cube that translates within a limited range of the XZ plane when the viewer drags it.
Rotating Shapes within a Sphere
Figure 9.6
Two shapes that rotate when the viewer drags them.
Rotating Shapes within a Cylinder
Figure 9.7
Two shapes that rotate about the Y axis when the viewer drags them.
Using Multiple Sensors in the Same Group
Figure 9.8
A cube that spins when the viewer's cursor moves over it and translates when the viewer drags it.
Using Multiple Sensors in Nested Groups
Figure 9.9
A desk lamp that can be adjusted using nested sensors.